<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>旋转木马</title>
    <style>
        body{
            perspective: 1200px;
            /* perspective-origin 观察者的位置。
            默认位置是物体的中心点  50% 50%  */
            perspective-origin: 50% -50%;
        }
        div{
            width: 200px; height: 300px;
            /* border: 5px solid red; */
            margin: 150px auto;
            position: relative;
            transform-style: preserve-3d;
            /* transform: rotateX(-15deg); */
            animation: move 10s linear infinite;
        }
        @keyframes move {
            from{transform: rotateY(0deg);}
            to{transform: rotateY(360deg);}
        }
        img{
            width: 100%; height: 300px;
            position: absolute;
            transform: translateZ(200px);
        }
        img:nth-of-type(1){transform: rotateY(40deg) translateZ(400px);}
        img:nth-of-type(2){transform: rotateY(80deg) translateZ(400px);}
        img:nth-of-type(3){transform: rotateY(120deg) translateZ(400px);}
        img:nth-of-type(4){transform: rotateY(160deg) translateZ(400px);}
        img:nth-of-type(5){transform: rotateY(200deg) translateZ(400px);}
        img:nth-of-type(6){transform: rotateY(240deg) translateZ(400px);}
        img:nth-of-type(7){transform: rotateY(280deg) translateZ(400px);}
        img:nth-of-type(8){transform: rotateY(320deg) translateZ(400px);}
        img:nth-of-type(9){transform: rotateY(360deg) translateZ(400px);}

    </style>
</head>
<body>
    <div>
        <img src="img/1.jpg" alt="">
        <img src="img/2.jpg" alt="">
        <img src="img/3.jpg" alt="">
        <img src="img/4.jpg" alt="">
        <img src="img/5.jpg" alt="">
        <img src="img/6.jpg" alt="">
        <img src="img/7.jpg" alt="">
        <img src="img/8.jpg" alt="">
        <img src="img/9.jpg" alt="">
    </div>
</body>
</html>
